/**
 * Created by reesoft on 2017/6/15.
 */

var UA = {
    isAndroid: function () {
        return navigator.userAgent.toLowerCase().indexOf("android") >= 0;
    },
    isiOS: function () {
        return /iPhone|iPad|iPod/.test(navigator.userAgent);
    },
    isWindowsPhone: function () {
        return /Windows Phone|WPDesktop/.test(navigator.userAgent);
    },
    isInPhoneBrowser: function () {
        return this.isAndroid() || this.isiOS();
    },
    isInMicroMessenger: function () {
        return navigator.userAgent.toLowerCase().indexOf("micromessenger") >= 0;
    },
    isInQQ: function () {
        return navigator.userAgent.match(/QQ\/([\d\.]+)/) != null;
    }
};
